package com.remote.common.model;


import com.remote.common.exception.RemoteException;
import lombok.Data;

/**

 * @date: 2018/1/7
 * 请求响应结果
 */
@Data
public class Response extends Invocation {
    /**
     * 是否成功
     */
    protected Boolean isSucceed;
    /**
     * 异常
     */
    protected RemoteException error;

    public RemoteException getError() {
        return error;
    }

    public void setError(RemoteException error) {
        this.error = error;
    }

    @Override
    public String toString() {
        return "Response{" +
                "isSucceed=" + isSucceed +
                ", error=" + error +
                ", clientId='" + clientId + '\'' +
                ", targetClientId='" + targetClientId + '\'' +
                ", command=" + command +
                ", value=" + value +
                '}';
    }
}
